<#include "/macro.include"/> 
<#include "/custom.include"/> 
<#assign className = table.className>   
<#assign classNameLower = className?lower_case>
var ${className}Manager;
var addNew${className}Open;

function() init${className}Manager(){
	var colimnsArray = []
	
	<#list table.columns as column>
	<#if !column.htmlHidden>
		colimnsArray.push{
			display : '${column.columnAlias}',
			name : '${column.constantName}',
			align : 'left',
			showTitle : true,
			minWidth : 50,
			align : "center",
			isSort : false
		});
	</#if>
	</#list>
	
	window['g'] = jQuery("#maingrid").ligerGrid({
		height : '100%',
		url:'${actionBasePath}/list.do',
		columns : colimnsArray,
		pageSize : 10,
		rownumbers : true,
		toolbar : {
			items : [ {
				text : '保存',
				click : saveUpdate,
				icon : 'modify'
			}, {
				line : true
			}, {
				text : '增加',
				click : itemclick,
				icon : 'add'
			}, {
				line : true
			}]
		},
		onSelectRow: function (rowdata, rowindex)
        {
           
        },
        enabledEdit: true, 
        isScroll: false, 
        rownumbers:true
	});
}

jQuery(function() {
	${className}Manager = init${className}Manager();
    
    jQuery("#pageloading").hide();
	
	jQuery("#save").click(function(){
		addNewUsersInfo();
	})
	jQuery("#reset").click(function(){
		resetNewUsersInfo();
	})
});